<?php
/**
 * 描述：账户数据。
 * @final
 */
final class DAO_Account
{
    public function Shipyard($count,$type='latest',$params=array())
    {
        $sql='select * from account ';
        $sql=$sql.'where not exists(select * from account_locked where account.Username=account_locked.Account) ';                                              //不锁定
        $sql=$sql.'and not exists(select * from account_delete where account.Username=account_delete.Account) ';                                                //没删除
        $sql=$sql.'and exists(select * from account_email_verification where account.Username=account_email_verification.Account) ';                            //己通过邮件验证
        $sql=$sql.'and (';                                                                                                                                      //属于船舶工业分类
        $sql=$sql."(concat(',',Trade_Class,',') regexp concat(',(',replace('".Filter::Mysql_Contact(DAO_Trade::ShipIndustry_VALUE)."',',','|'),'),')) ";
        $sql=$sql.") ";
        $sql=$sql.'order by ID desc limit 0,'.$count;
        $data=DB::GetRows($sql);
        return $data;
    }
}
?>